﻿#pragma once
#include<map>
#include<vector>
#include<iostream>
using namespace std;

class NFA {
public:
    NFA(size_t start, size_t end);
    size_t start = 0, end = 0; // NFA只需要知道起点与终点即可
};

class Edge {
public:
    Edge(size_t start, size_t end, const string& symbolOnEdge);
    size_t start = 0, end = 0; // 起点与终点
    Edge* next = nullptr; // 下一条边
    string symbolOnEdge; // 边上的字符
};

class NFANode {
public:
    Edge* first = nullptr; // 邻接表第一个出边
    map<string, vector<size_t>> tableMap; // NFA表格，通过first去到的点集second
};
